Common Scripts
A guide to the common scripts used in Myth Drannor Building Areas OnEnter/OnExit All Areas should have: OnEnter: mod_encounter_oe (for day only/night only encounters) OR OnEnter: se_oea_rsp_traps (does not set an area to be trapped; this requires invisible placeables. It has the save PC to Server Vault however) OnExit: mod_despawn_oax These can be found by right clicking an Area, choosing properties, and then under the Events Tab. <--- This image doesn't work 'New ATs' (note my module has them listed under Triggers->Custom as Area Transfer, I do not remeber if that is standard or I made that). By simply setting the variable for the TARGET_WP to another WayPoint, any thing entering it should move to the new WP. A variety of checks can also be added as well as success and error messages if wanted. Check mod_movepc_oe for more details. 'mod_movepc_ou:' this script can be used to move a PC from one location to another when using a placeable. NOTE: mod_movepc_ou or mod_movepc_onent the format of your Waypoints and Items for those strings are -very- important. mod_movepc_ou and mod_movepc_onent These are basicly the same script. Difference, one is for triggers, the other for placeables. Triggers should use the mod_movepc_onent for the "onEnter", items/placeables etc mod_movepc_ou "onUse". These scripts have the same base variables as follows: WP_LOCATION required - This is the tag of the way point you wish the target to go to. This is the only required variable. If you do not use any "restriction" variables, the script will simply move the PC to the WP. SKILL_ and STAT_ and SAVE_ and ITEM_TAG and _LEVEL not required - These variables will all become requirements the PC must meet. These are the "restriction" variables. SKILL_(int) are a skill check the PC must succeed at (SKILL_UMD, SKILL_LORE etc). ITEM_TAG(string) is the tag of the item the PC must have in their possesion. _LEVEL (int) is the levels the PCs must be to use it (MAX_LEVEL and MIN_LEVEL). STATs(int) is a stat check the PC must succeed at, say a wisdom check. MSG_SUCCESS and MSG_FAILURE not required- Strings that will be displayed to the user as floaty text. Possible uses are, you make an item that when used has a chance of TPing a user to a far away place. MSG_SUCCESS - "With a few twists and turns the device glows and you begin to fade as you move across the planes." MSG_FAILURE - "Moving about the widgets and gizmos across the items surface seems to do little but frustrate you." for the variable WP_LOCATION (name) it's a string (type) and the Value must be in the form WP_YourWaypoint. Which means the tag of your waypoint has to be WP_YourWaypoint. The same goes for the variable ITEM_TAG (name), the tag of your item to be checked has to be ITEM_YourItem. So if you type something like Elventree as the tag of an item it won't work. Has to be ITEM_Elventree. Because the value of the variable ITEM_TAG is going to be ITEM_Elventree. 'Teleportation' To limit teleportation within an area, you will need to go to the area properties page, the Advanced tab, and then the Variables button. then, type in PRC_DISABLE_TELEPORTATION_IN_AREA choose Int as the type, and input a value, then press add BEFORE you press OK. The values are below: TO - means teleporting INTO the area from a different area (you cannot get in) FROM - means teleporting FROM the current area to a different area (you cannot get out) WITHIN - means teleporting inside an area (from one spot to another, which is what Dimension door always is I think) No TO: 1 No FROM: 2 No TO & FROM: 3 No WITHIN: 4 No TO & WITHIN: 5 No FROM & WITHIN: 6 No TO & FROM & WITHIN: 7 Merchants mod_store_conv: there is one merchant script now that we are supposed to use. Set the Variable MERCHANT_tag (string) on the NPC (or whatever you use) that functions as the merchant conversation. Set the value of the MERCHANT_tag equal to the tag of the merchant you wish to launch. Locks mod_closelock_oc: use this to close and possibly lock a door after a certain amount of time based on the LOCK_DURATION* and LOCK* variables set on the door. This script is designed to close open doors, and possibly lock them. It defaults to a 5 second timewindow without locking. It gets assigned to the OnOpen event of doors. CLOSE_TIMER not required - CLOSE_TIMER (float) - This is the time in seconds that you wish to wait to close and possibly lock the door. LOCK not required LOCK (int) - any value other than 0 will cause the door to lock upon closing. Misc 'l404_trig_float' Use this to make floaty yellow text when a trigger is used. This function when as the OnEnter event will make the Name (not the tag the Name) of the trigger appear as floating text to the PC. 'mod_effect_onent' Use this to make effects (both visual and char effecting). They can be temporary, or permanent while inside the trigger. designed to be used in a trigger. It applies an effect, either visual (metor showers, web, etc) or PC effecting (slow, paralyze, dispel) on enter. It can - be set to a duration (say 6 seconds), or permanent to function as a trigger. If permanent the effect stays until the PC leaves the trigger. - send a text message on enter as floating yellow text. - set the effect is to be magical(default), supernatural or exceptional. An example of exceptional is setting a PC to slow when entering deep water. - be set to effect PCs and mosnters alike,or just PCs The default behavior is to effect only PCs with permanent magical effects (so they can be dispelled etc etc). *note, if using this as a permanent effect, the script needs to be set as OnEnter and OnExit of the trigger. Variables: DURATION otional, float, if 0 (or not set) will make them permanent till they leave the triger. EFFECT_ALL optional, int, if 1 effect both PCs and Monsters entering. Otherwise only effect PCs. EFFECT_SLOW optional, int, if 1 will create a slow effect. EFFECT_PARALYZE optional, int, if 1 will create a paralyze effect EFFECT_DISPEL optional, int, the level of the caster to use in the Dispel Magic effect. EFFECT_TYPE optional, int, the type of effect you want. 1 = Exceptional, 2 = Supernatural. It defaults to magical. VISUAL_EFFECT optional, int, the visual effect you wish to show. MSG optional, string, the message you wish the PC to see as yellow floating text. 'mod_show_onent' The mod show onent script is designed to spawn a "hidden" object when a PC crosses over a trigger. This is done by assigning the script to the onEnter event of a trigger. A waypoint where you want the spawned item to appear. Then variables are used to define the functionality. PLACEABLE_RESREF required PLACEABLE_RESREF, string, This is the resref of the item that you wish to spawn. WP_LOCATION required WP_LOCATION, string, this is the tag of WP you created that you want the hidden object to spawn at. MSG_SUCCESS optional MSG_SUCCESS, string, a message you can display to the PCs upon successful searching as floating yellow text. HIDE_DURATION optional HIDE_DURATION, int, the time in server minutes you wish the item to stay once it has spawned. It defaults to 5. SKILL_ and ITEM_TAG optional The various SKILL variables (SKILL_SEARCH and SKILL_SPOT), int, the DC of the skill check the PC must beat to spawn the hidden item. ITEM_TAG, string, the tag of the item the PC must posses to spawn the hidden object. 'mod_traploc_oncl' This script is used to dynamicly set and update traps and locks on doors and chests. The possible variables are: LOCK_ODDS - an int, the percentage chance this item will have a lock. If not provided this defaults to 0. TRAP_OODS - an int, the percentage chance this item will have a trap. If not provided this defaults to 0. TRAP_TYPE - an int, the type of trap to place on the item if it has a trap. This has no use if no trap is made. Minor Spike = 0 Average Spike = 1 Strong Spike = 2 Deadly Spike = 3 Minor Holy = 4 Average Holy = 5 Strong Holy = 6 Deadly Holy = 7 Minor Tangle = 8 Average Tangle = 9 Strong Tangle = 10 Deadly Tangle = 11 MinorAcid = 12 Average Acid = 13 Strong Acid = 14 Deadly Acid = 15 Minor Fire = 16 Average Fire = 17 Strong Fire = 18 Deadly Fire = 19 Minor Electrical = 20 Average Electrical = 21 Strong Electrical = 22 Deadly Electrical = 23 Minor Gas = 24 Average Gas = 25 Strong Gas = 26 Deadly Gas = 27 Minor Frost = 28 Average Frost = 29 Strong Frost = 30 Deadly Frost = 31 Minor Negative = 32 Average Negative = 33 Strong Negative = 34 Deadly Negative = 35 Minor Sonic = 36 Average Sonic = 37 Strong Sonic = 38 Deadly Sonic = 39 Minor AcidS plash = 40 Average Acid Splash = 41 Strong Acid Splash = 42 Deadly Acid Splash = 43 Category:Building